home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.ListSelectionModel;
- import com.sun.java.swing.event.ListDataEvent;
- import com.sun.java.swing.event.ListDataListener;
- import java.io.Serializable;
-
- public class BasicListUI$DataListener implements ListDataListener, Serializable {
- // $FF: synthetic field
- BasicListUI this$0;
-
- public void intervalAdded(ListDataEvent e) {
- this.this$0.updateLayoutStateNeeded = 1;
- int minIndex = Math.min(e.getIndex0(), e.getIndex1());
- int maxIndex = Math.max(e.getIndex0(), e.getIndex1());
- ListSelectionModel sm = this.this$0.list.getSelectionModel();
- if (sm != null) {
- sm.insertIndexInterval(minIndex, maxIndex - minIndex, true);
- }
-
- int y = Math.max(0, this.this$0.convertRowToY(minIndex));
- int h = this.this$0.list.getHeight() - y;
- this.this$0.list.revalidate();
- this.this$0.list.repaint(0, y, this.this$0.list.getWidth(), h);
- }
-
- public void intervalRemoved(ListDataEvent e) {
- this.this$0.updateLayoutStateNeeded = 1;
- ListSelectionModel sm = this.this$0.list.getSelectionModel();
- if (sm != null) {
- sm.removeIndexInterval(e.getIndex0(), e.getIndex1());
- }
-
- int minIndex = Math.min(e.getIndex0(), e.getIndex1());
- int y = Math.max(0, this.this$0.convertRowToY(minIndex));
- int h = this.this$0.list.getHeight() - y;
- this.this$0.list.revalidate();
- this.this$0.list.repaint(0, y, this.this$0.list.getWidth(), h);
- }
-
- public void contentsChanged(ListDataEvent e) {
- this.this$0.updateLayoutStateNeeded = 1;
- this.this$0.list.revalidate();
- this.this$0.list.repaint();
- }
-
- // $FF: synthetic method
- public BasicListUI$DataListener(BasicListUI this$0) {
- this.this$0 = this$0;
- }
- }
-